<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <style type="text/css">
        table {border-collapse: collapse; font-size: 14px; width: 80%; margin: auto}
        table, th, td {border: 1px solid darkslategray;padding: 10px}
    </style>
</head>
<body>
<span style="align-content: center">欢迎[[${session.username}]]</span>
<a th:href="@{/etc/toInsert}">添加</a>
<form th:action="@{/etc/findName2}" method="post">
    车牌号：<input type="text" name="etcname"/>
    ETC卡号：<input type="text" name="etccode"/><br/>
    <input type="submit" value="提交">
<table class="list">
    <tr>
        <th>id</th>
        <th>车牌号</th>
        <th>ETC卡号</th>
        <th>余额</th>
        <th>用户</th>
        <th>使用年限</th>
        <th>操作</th>
    </tr>
    <tr th:each="etc : ${all}">
        <td th:text="${etc.id}"></td>
        <td th:text="${etc.name}"></td>
        <td th:text="${etc.etccode}"></td>
        <td th:text="${etc.money}"></td>
        <td th:text="${session.username}"></td>
        <td th:text="${etc.usebirth}"></td>
        <td><a href="#">提醒</a></td>
    </tr>
</table>
</form>
</body>
</html>